<template>
	<view class="margin-top cu-list menu">
		<view class="cu-item arrow" v-for="(item,index) in items" :key="index" @tap="clickFunc(item)">
			<button v-if="item.page=='kefu'" open-type="contact"  class="content">
				<view  class="content">
					<text  :class="item.iconClass"></text>
					<text >{{item.name}}</text>
				</view>
			</button>
			<button v-else-if="item.page=='feedback'" open-type="feedback" class="content">
				<view  class="content"> 
					<text  :class="item.iconClass"></text>
					<text >{{item.name}}</text>
				</view>
			</button>
			<view v-else class="content">
				<text  :class="item.iconClass"></text>
				<text >{{item.name}}</text>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		name: 'list-item',
		props: {
			items: {
				type: Array,
				default: function() {
					return [];
				}
			}
		},
		methods: {
			clickFunc(item) {
				if(item.page=='kefu' || item.page=='feedback') {
					return;
				}
				this.$jump(item.page)
			}
		}
	}
</script>

<style>
</style>
